{% extends "objects/base.html" %}

{% block title %}
МПМ Былины. Подбор предметов по параметрам
{% endblock %}


{% block menu %}
{% include "objects/menu.html" %}
{% endblock %}


{% block content %}

<h2>Подбор по параметрам:</h2>

<form method="get">
    {{ form.as_p }}
    <input type="submit" value="Найти" />
</form>

<h2>Найдено {{ count }}:</h2>
<div class="pagination">
    <span class="step-links">
        {% if objs.has_previous %}
            <a href="?{{queries.urlencode}}&amp;page={{ objs.previous_page_number }}"><<</a>
        {% endif %}

        <span class="current">
            {{ objs.number }} из {{ objs.paginator.num_pages }}
        </span>

        {% if objs.has_next %}
            <a href="?{{queries.urlencode}}&amp;page={{ objs.next_page_number }}">>></a>
        {% endif %}
    </span>
</div>

<table>
{% for obj in objs %}
<tr><td>
{% include "objects/object_short.html" %}
</td></tr>
{% endfor %}
</table>

<div class="pagination">
    <span class="step-links">
        {% if objs.has_previous %}
            <a href="?{{queries.urlencode}}&amp;page={{ objs.previous_page_number }}"><<</a>
        {% endif %}

        <span class="current">
            {{ objs.number }} из {{ objs.paginator.num_pages }}
        </span>

        {% if objs.has_next %}
            <a href="?{{queries.urlencode}}&amp;page={{ objs.next_page_number }}">>></a>
        {% endif %}
    </span>
</div>


{% endblock %}
